<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddColumntoVideocall extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('video_call', function (Blueprint $table) {
            $table->string('order_id', 50)->default('')->comment('订单ID')->after('channel_id');
            $table->double('total_cost', 10, 1)->default(0.0)->comment('话单费用');
            $table->double('caller_cost', 10, 1)->default(0.0)->comment('拨打方扣除');
            $table->double('host_gain', 10, 1)->default(0.0)->comment('接听方分成');
            $table->double('allowance', 10, 1)->default(0.0)->comment('官方补贴');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('video_call', function (Blueprint $table) {
            //
        });
    }
}
